<div style="height: auto; width: auto">
  <table class="phorum">
    {assign var=counter value=2}
    {foreach $data.task_data.phorum as $key => $post}
      {if $counter==2}
        {assign var=bgClass value='bgDark'}
      {else}
        {assign var=bgClass value='bgLight'}
      {/if}
      <tr class="phorum-post {$bgClass}" id="{$post.task_phorum_id}">
        {if $counter==1}
          {assign var=counter value=2}
        {else}
          {assign var=counter value=1}
        {/if}
        <td style="width: 80px">{$post.user_data.name} {$post.user_data.surname}</td>
        <td style="width: 120px">{$post.when}</td>
        <td style="border-right: 0px solid white; width: auto">
          {$post.text}
        </td>
        <td style="width: 45px; border-left: 0px solid white;">
          {if $smarty.session.user.user_id == $post.user_id || $smarty.session.user.profile.userlevel == $smarty.const.USER_TYPE_ADMIN}
            <a class="baseLink" href="javascript: editPost({$post.task_phorum_id})"><img src="{$smarty.const.PATH_TO_IMAGES}edit.png" height="20" width="20" /></a>
            <a class="baseLink" href="javascript: deletePost({$post.task_phorum_id})"><img src="{$smarty.const.PATH_TO_IMAGES}delete.png" height="20" width="20" /></a>
            {/if}
        </td>
        <td style="text-align: center; vertical-align: middle">
          {if $smarty.session.user.profile.userlevel != $smarty.const.USER_TYPE_CLIENT}
            <input id="post_to_desc_{$post.task_phorum_id}" value="{$post.text|replace: '"':'`'}" type="hidden" />  
            <input class="post_to_desc" value="{$post.task_phorum_id}" type="checkbox" />
          {/if}
        </td>
      </tr>
    {/foreach}
  </table>
</div>